﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Service;
using Model;

namespace Manager
{
    /// <summary>
    /// Sys_RoleModule业务逻辑
    /// 创建人：Wilson
    /// 创建时间：2013-1-29  
    /// </summary>
    public class Sys_RoleModuleManager
    {
        			
        #region##通过主键ID得到Sys_RoleModule
        /// <summary>
        /// 功能：通过ID得到Sys_RoleModule
        /// 创建人：  Wilson 
        /// 创建时间：2013-1-29   
        /// </summary>
        /// <param name="">主键ID</param>
        /// <returns></returns>
        public Sys_RoleModule GetById(int rmid)
        {            
            using (Sys_RoleModuleService ws = new Sys_RoleModuleService())
			{
				return ws.GetById(rmid);
			}
        }
        #endregion
		
		#region##通过主键ID删除Sys_RoleModule
        /// <summary>
        /// 功能：通过主键ID删除Sys_RoleModule
        /// 创建人：  Wilson 
        /// 创建时间：2013-1-29   
        /// </summary>
        /// <param name="">主键ID</param>
        /// <returns></returns>
		public int DeleteById(int rmid)
		{
			using (Sys_RoleModuleService ws = new Sys_RoleModuleService())
			{
				return ws.DeleteById(rmid);
			}
		}
		#endregion			
		
        #region##添加Sys_RoleModule
        /// <summary>
        /// 功能：添加Sys_RoleModule
        /// 创建人：  Wilson 
        /// 创建时间：2013-1-29
        /// </summary>
        /// <param name=""></param>
        /// <returns></returns>
        public int Add(Sys_RoleModule sys_rolemodule)
        {
            using (Sys_RoleModuleService ws = new Sys_RoleModuleService())
			{
				return ws.Add(sys_rolemodule);
			}
        }
        #endregion
		
		#region##得到Sys_RoleModule集合
		/// <summary>
        /// 功能：得到Sys_RoleModule集合
        /// 创建人：  Wilson 
        /// 创建时间：2013-1-29
        /// </summary>       
        /// <returns></returns>
		public IList<Sys_RoleModule> GetList()
		{
		    using (Sys_RoleModuleService ws = new Sys_RoleModuleService())
			{
				return ws.GetList();
			}
		}
		#endregion
		
		#region##修改Sys_RoleModule
        /// <summary>
        /// 功能：修改Sys_RoleModule
        /// 创建人：  Wilson 
        /// 创建时间：2013-1-29
        /// </summary>
        /// <param name=""></param>
        /// <returns></returns>
        public int ModSys_RoleModule(Sys_RoleModule sys_rolemodule)
        {
            using (Sys_RoleModuleService ws = new Sys_RoleModuleService())
			{
				return ws.ModSys_RoleModule(sys_rolemodule);
			}
        }
        #endregion
		
		#region##统计Sys_RoleModule
		/// <summary>
        /// 修改Sys_RoleModule
        /// 创建人：  Wilson 
        /// 创建时间：2013-1-29
        /// </summary>
        /// <param name=""></param>
        /// <returns></returns>
		public int SelectCount()
		{
			using (Sys_RoleModuleService ws = new Sys_RoleModuleService())
			{
				return ws.SelectCount();
			}
		}
        /// <summary>
        /// 修改Sys_RoleModule
        /// 创建人：  Wilson 
        /// 创建时间：2013-1-29
        /// </summary>
        /// <param name=""></param>
        /// <returns></returns>
        public int SelectCountById()
        {
            using (Sys_RoleModuleService ws = new Sys_RoleModuleService())
			{
				return ws.SelectCountById();
			}
        }
		#endregion
        #region##自定义Sys_RoleModule
        public IList<Sys_RoleModule> GetByRole(int roleId)
        {
            using (Sys_RoleModuleService ws = new Sys_RoleModuleService())
            {
                return ws.GetByRole(roleId);
            }
        }
        #endregion
    }
}